package com.yzc.mihuyou.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author 易紫诚
 * @since 2022-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="User对象", description="用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty(value = "账号")
    private String userAccount;

    @ApiModelProperty(value = "密码")
    private String userPassword;

    @ApiModelProperty(value = "头像地址")
    private Integer userPortrait;

    @ApiModelProperty(value = "个性签名")
    private String userIndividuality;

    @ApiModelProperty(value = "0  普通用户 1管理员")
    private Integer userJurisdiction;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "用户昵称")
    private String userNikname;

    @ApiModelProperty(value = "性别")
    private  Integer userGender;

    @TableField(exist = false,value = "收藏的数量")
    private long userNum;

    @ApiModelProperty(value = "关注数")
    private long userAtt;

    @ApiModelProperty(value = "粉丝数")
    private long att;

    @TableField(exist = false,value = "获得的赞")
    private long Good;

    @TableField(exist = false,value = "是否关注")
    private boolean poe;

    @TableField(exist = false,value = "头像地址")
    private String userImage;



    public User(String userAccount, String userPassword, Integer userPortrait, String userNikname) {
        this.userAccount = userAccount;
        this.userPassword = userPassword;
        this.userPortrait = userPortrait;
        this.userNikname = userNikname;

    }

    public User() {
    }

    public User(String userAccount, String userPassword, String userNikname) {
        this.userAccount = userAccount;
        this.userPassword = userPassword;
        this.userNikname = userNikname;
    }
}
